package com.ky.pro.java.dt.app.controller;

import com.ky.pro.java.dt.app.service.IPaymentPostProcessingService;
import com.ky.pro.java.dt.common.web.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/payment")
public class PaymentController {

    @Autowired
    IPaymentPostProcessingService paymentPostProcessingService;

    @PostMapping("/postprocessing/orderNo/{orderNo}")
    public ResultBean<String> handlePostProcessing(@PathVariable("orderNo") long orderNo) {
        paymentPostProcessingService.process(orderNo);
        return ResultBean.genResult("执行成功");
    }

}
